package com.demo.java.utils;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

public class DateUtils {
    public static final String DATE_FMT = "yyyy-MM-dd HH:mm:ss";

    public static String currentDateTime() {
        return LocalDateTime.now().format(DateTimeFormatter.ofPattern(DATE_FMT));
    }

    public static void main(String[] args) {
        System.out.println(DateUtils.currentDateTime());
    }
}
